package git.soulbgm.common.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * Mapper切面
 *
 * @author SoulBGM
 * @date 2020-08-13
 */
@Component
@Aspect
public class MapperAspect {

    @Pointcut("execution(public * git.soulbgm.mapper.*.save*(..)) || " +
            "execution(public * git.soulbgm.mapper.*.insert*(..)) || " +
            "execution(public * git.soulbgm.mapper.*.add*(..))")
    public void buildId() { }

    public Object around(ProceedingJoinPoint pjp) throws Throwable {
        Object result = pjp.proceed();
        return result;
    }
}
